var SeptJSBridge = {
    call(method, params = {}) {
        var message = JSON.stringify({ method, params });
        // iOS
        if (window.webkit?.messageHandlers?.NativeBridge) {
            window.webkit.messageHandlers.NativeBridge.postMessage(message);
        }
        // Android
        else if (window.AndroidBridge?.[method]) {
            window.AndroidBridge[method](JSON.stringify(params));
        } else {
            console.warn('No native bridge available');
        }
    },

    onMessage(payload) {
        var evt = new CustomEvent("SeptJSBridageListener", { detail: payload });
        document.dispatchEvent(evt);
    }
,
//     showAllMessageTrue(payload) {
//         var evt = new CustomEvent("showAllChangeTrue", { detail: true });
//         document.dispatchEvent(evt);
//     }
// ,
// showAllMessageFalse(payload) {
//     var evt = new CustomEvent("showAllChangeFalse", { detail: false });
//     document.dispatchEvent(evt);
// }

   
}

window.SeptJSBridge = SeptJSBridge;
